package com.sjp.dao;

import com.sjp.pojo.BlogCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BlogCategoryMapper {
    //查询所有分类
    List<BlogCategory> queryAllCategory();
    //保存分类
    boolean saveCategory(@Param("name")String name);
    //批量删除分类
    int deleteCategory(@Param("ids")Integer[] ids);
    //修改分类的信息
    boolean updateCategory(@Param("id")Integer id, @Param("name") String name);
    //统计分类的总数
    int countCategory();
    //设置count（该分类下有多少博客）的值
    boolean setCount();
    //根据id查分类名称
    String queryNameById(@Param("id") Integer id);
}
